var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/configComponent/form/renderLabel.tsx
var renderLabel_exports = {};
__export(renderLabel_exports, {
  default: () => renderLabel
});
module.exports = __toCommonJS(renderLabel_exports);
var import_functionalComponent = require("../../functionalComponent");
var import_util = require("../../util");
function renderLabel(props) {
  const { width, label: originLabel, langKey, labelAlign } = props;
  const label = import_util.iup.getPageLang()[langKey] ?? originLabel;
  const labelStyle = {
    width,
    display: "-webkit-box",
    textAlign: labelAlign || "right",
    wordBreak: "break-all",
    whiteSpace: "normal",
    maxHeight: "35px",
    lineHeight: 1.25,
    overflow: "hidden",
    WebkitLineClamp: 2,
    textOverflow: "ellipsis",
    WebkitBoxOrient: "vertical"
  };
  return /* @__PURE__ */ React.createElement(import_functionalComponent.Tooltip, { title: label, overflow: true, placement: `top${labelAlign === "left" ? "Left" : "Right"}` }, /* @__PURE__ */ React.createElement("span", { style: labelStyle }, label));
}
